import request from '@/utils/request'

export const url = {
  getPage: 'admin/moduleform/listPage'
}

export function add(data) {
  return request.post('admin/moduleform/add', data)
}

export function del(data) {
  return request.post('admin/moduleform/del', data)
}

export function edit(data) {
  return request.post('admin/moduleform/edit', data)
}

export function getTablePage(data) {
  return request.post(url.getPage, data)
}

export function tableList(data) {
  return request.post('admin/moduleform/tableList', data)
}

export function getMenusTree(data) {
  return request.get('admin/menu/tree', data)
}

export function updateFormJson(data) {
  return request.post('admin/moduleform/updateFormJson', data)
}

export default {add, del, edit, getMenusTree, getTablePage}
